package com.network;

import java.io.DataOutputStream;
import java.io.PrintStream;
import java.net.Socket;

public class BsServerThread extends Thread{
    private Socket socket;
    BsServerThread(Socket socket){
        this.socket = socket;
    }
    public void run(){
        try{
            PrintStream printStream = new PrintStream(socket.getOutputStream());
            printStream.println("HTTP/1.1 200 OK");
            printStream.println("Content-type:text/html;charset=UTF-8");
            printStream.println();
            printStream.println("你好");
            printStream.close();
            socket.close();
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
